package com.yugao.fintech.antelope.auth.oauth2;

import com.yugao.fintech.antelope.auth.oauth2.model.RegisteredClient;
import com.yugao.fintech.antelope.base.model.module.auth.LoginUser;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OAuth2TokenContext {
    private RegisteredClient registeredClient;
    private String loginId;
    private List<String> authorizedScopes;
    private String grantType;
    /**
     * 授权用户
     */
    private LoginUser authUser;

    /**
     * token中claims(相当于负载)
     */
    private Map<String, Object> claims = new HashMap<>();
}
